#! /bin/bash
export LANG=zh_CN.UTF-8
PRESTO_HOME=/export/server/presto/bin/presto


${MYSQL_HOME} -h192.168.88.80 -p3306 -uroot -p123456 -e "
CREATE DATABASE IF NOT EXISTS edu DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
use edu;"
${PRESTO_HOME} --catalog hive --server 192.168.88.80:8090 --execute "
create table mysql.edu.wf_clu_hour
as select * from hive.edu_rpt.wf_rpt_clu_hour;

create table mysql.edu.wf_rpt_cus_cnt_day
as select * from hive.edu_rpt.wf_rpt_cus_cnt_day;

create table mysql.edu.wf_rpt_cus_cnt_month
as select * from hive.edu_rpt.wf_rpt_cus_cnt_month;

create table mysql.edu.wf_rpt_cus_cnt_year
as select * from hive.edu_rpt.wf_rpt_cus_cnt_year;"
